<#include "../common/_header.htm">
<script src="${ctx}/plugins/d3/js_re/D3ForceService.js"></script>
<style>
	.fl{float:left;}
	.d3-toolbox{display:block;position:fixed;left:0;top:0;width:220px;min-height:260px;border:1px solid #ddd;background:#fff;}
	.d3-viewbox{margin:5px;float:left;}
	.d3-viewbox2{padding:5px;margin:5px;float:left;border:1px solid #ddd;}
	.d3-view-type{float:left;width:60px;height:24px;line-height:24px;border:1px solid #ddd;color:#000;font-family:微软雅黑;margin-left:5px;border-radius:3px;display: block;text-align:center;cursor:pointer;}
	.d3-view-type:hover{border:none;color:#fff;background:#52a1fe;}
	.d3-view-type.current{border:none;color:#fff;background:#52a1fe;cursor:auto;}
	.d3-purple{float:left;width:90px;height:16px;color:#fff;background:#7200da;}
	.d3-yellow{float:left;width:90px;height:16px;color:#fff;background:#f9c00c;}
	.d3-blue{float:left;width:90px;height:16px;color:#fff;background:#007efe;}
	.d3-money{float:left;margin:5px 0;}
	.d3-money input{width:100px;border:1px solid #ddd;}
	.d3-button{margin-left:50px;width:100px;height:30px;line-height:30px;color:#fff;background:#52a1fe;font-family:微软雅黑;border-radius:3px;display: block;text-align:center;cursor:pointer;}
</style>
<div id="hidebox" style="height:100%;width:100%">
</div>
<div class="d3-toolbox">
	<div class="d3-viewbox"><font class="fl">默认颜色：</font><span class="d3-blue"></span></div>
	<div class="d3-viewbox2"><font class="fl">颜色设置1：</font><span class="d3-purple"></span><span class="d3-money">最小金额：<input value="10000000" id="level2min"></input>&nbsp;元</span></div>
	<div class="d3-viewbox2"><font class="fl">颜色设置2：</font><span class="d3-yellow"></span><span class="d3-money">最小金额：<input value="1000000" id="level1min"></input>&nbsp;元</span><span class="d3-money">最大金额：<input id="level1max" value="10000000"></input>&nbsp;元</span></div>
	<div class="d3-viewbox" align="center"><span class="d3-button">重新加载</span></div>
</div>
<script>
	var d3view = new d3ForceService();
	var dialog = top.dialog.get(window);
    var data = dialog.data; // 获取对话框传递过来的数据
	$.ajax({
		url: data.reqUrl,
        dataType:'json',
	    type: 'post',
	    async:true,
	    data : data,
	    success:function (obj) {
	    	d3view.init(obj.rsd3.nodes,obj.rsd3.links,"#hidebox");
	    }
	});
	$(document).on("click",".d3-button",function(){
		d3view.level1.min=Number($("#level1min").val());
		d3view.level1.max=Number($("#level1max").val());
		d3view.level2.min=Number($("#level2min").val());
		d3view.refresh();
	})
</script>

<style>
	#hidebox {
		top: 23px;
		left: 2%;
		border-radius: 5px;
		background-color:#fff;
		z-Index:9999;
		padding: 10px;
		overflow:hidden;
	}
</style>
</body>
</html>